#define  _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include<math.h>
#include<string.h>

int main()
{
	char arr[1000] = { 0 }, a[100][50] = { 0 }, b[100][50] = { 0 };
	gets(arr);
	int len = strlen(arr), i = 0, j = 0, k = 0, temp = 0, sum = 0, c = 0;
	for (i = 0, j = 0, k = 0; i < len; i++)
	{
		if (arr[i] != ' ')
		{
			a[j][k++] = arr[i];
		}
		else
		{
			j++;
			k = 0;
		}
	}
	for (i = 0, sum = 0, c = 0; i < j; i++)
	{
		temp = c;
		for (k = 0; k <= temp; k++)
		{
			if (strcmp(a[i], b[k]) != 0)
			{
				sum++;
			}
		}
		if (sum == k)
		{
			strcpy(b[c], a[i]);
			c++;
		}
	}
	printf("%d\n", c);
	return 0;
}